# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-mmh3
pkgver=3.0.0
pkgrel=1
pkgdesc="Python wrapper for MurmurHash (MurmurHash3), a set of fast and robust hash functions"
url="https://github.com/hajimes/mmh3"
arch="all"
license="CC0-1.0"
depends="python3"
makedepends="python3-dev py3-setuptools"
checkdepends="py3-numpy"
subpackages="$pkgname-doc"
source="mmh3-$pkgver.tar.gz::https://github.com/hajimes/mmh3/archive/v$pkgver.tar.gz"
builddir="$srcdir/mmh3-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" python3 test_mmh3.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="
40ef0a477b18544a4353c45cd5444039e2f79a3a047a6f5ba9c9595e45211429f94ba23402cd206a5edace618780b051d37c787fd1a9253df874015161011422  mmh3-3.0.0.tar.gz
"
